Alternatives

Two regular expressions, simple or compound, may be separated by a vertical bar ( | ) to produce an expression that matches either one of the expressions. For example,

[a-z]|[A-Z]

matches either a single lowercase or uppercase letter.

See Also